import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import About from '@/view/index'
import Animate from '@/view/animate/animate'
import BFC from '../view/test/bfc'
Vue.use(Router)
const Foo = { template: '<div>this is foo</div>' }
export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/foo',
      name: 'foo',
      component: Foo
    },
    {
      path: '/about',
      name: 'about',
      component: About
    },
    {
      path: '/animate',
      name: 'animate',
      component: Animate
    },
    {
      path: '/bfc',
      name: 'bfc',
      component: BFC
    },
    {
      path: '/emTest',
      name: 'emTest',
      component: () => import('@view/test/emTest')
    },
    {
      path: '/dynaminc',
      name: 'dynaminc',
      component: () => import('@/view/DynamicComponent/index')
    },
    {
      path: '/less',
      name: 'less',
      component: () => import('@view/less/index')
    },
    {
      path: '/sass',
      name: 'sass',
      component: () => import('@view/sass/index')
    },
    {
      path: '/promise',
      name: 'promise',
      component: () => import('@view/js/promise')
    }
  ]
})
